package cc.vicp.djx314.starfood.util;

import java.util.Date;
import java.util.List;

import cc.vicp.djx314.starfood.domain.dish.Dish;
import cc.vicp.djx314.starfood.domain.order.OrderDish;
import cc.vicp.djx314.starfood.util.exception.StartProvideTimeLaterThanEndException;

public interface DishTimeEnsure {
	/**
	 * 判给定的供应时间是否在菜式的提供时间之内
	 * @param dish
	 * @param date
	 * @return
	 * @throws StartProvideTimeLaterThanEndException
	 */
	public boolean isDishTimeSupport(Dish dish, Date date) throws StartProvideTimeLaterThanEndException;

	/**
	 * 获取一个菜式订单的供应时间时候合适的信息
	 * @param orderDishes
	 * @param date
	 * @return
	 * @throws StartProvideTimeLaterThanEndException 
	 */
	public List<OrderDish> getSupportInfo(List<OrderDish> orderDishes, Date date) throws StartProvideTimeLaterThanEndException;
}